from django.db import models

# Create your models here.
class Jue(models.Model):
    id=models.AutoField(primary_key=True)
    rolename=models.CharField(max_length=20,null=False)

class U_user(models.Model):
    SEX=[(1,'男'),(2,'女')]
    id=models.AutoField(primary_key=True)
    uname=models.CharField(max_length=20,null=False)
    truename=models.CharField(max_length=20,null=False)
    pwd=models.CharField(max_length=32,null=False)
    tel=models.CharField(max_length=11,null=False)
    sex=models.IntegerField(choices=SEX,null=False)
    roleid=models.ForeignKey('Jue',on_delete=models.CASCADE)
    address=models.CharField(max_length=100,null=False)